hget

// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.hget('key', 'field1', function (err, value) {
  // callback called once the action has completed
});

// Using promises (NodeJS only)
kuzzle.memoryStorage.hgetPromise('key', 'field1')
  .then(value => {
    // resolved once the action has completed
  });
kuzzle.memoryStorage.hget("key", "field1", new ResponseListener<String>() {
  @Override
  public void onSuccess(String value) {
    // callback called once the action has completed
  }

  @Override
  public void onError(JSONObject error) {
  }
});
<?php

use \Kuzzle\Kuzzle;


$kuzzle = new Kuzzle('localhost');

try {
  $value = $kuzzle->memoryStorage()->hget('key', 'field1');
}
catch (ErrorException $e) {

}

Callback response:

"foo"

Returns the field’s value of a hash.

[Redis documentation]


hget(key, field, [options], callback)

ArgumentsTypeDescription
keystringKey identifier
fieldstringField name
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Callback response

Returns the requested field's value.