Skip to content
Subhajit Sahu edited this page Dec 8, 2022 · 15 revisions

Get value at specified key.

Similar: get, getAll, getPath.
Similar: get, set, swap, remove.


function get(x, k)
// x: an object
// k: key
const object = require('extra-object');

var x = {a: 2, b: 4, c: 6, d: 8};
object.get(x, 'b');
// → 4

object.get(x, 'd');
// → 8


References

Clone this wiki locally