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

Get values at keys.

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


function getAll(x, ks)
// x:  an object
// ks: keys
const object = require('extra-object');

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

object.getAll(x, ['e']);
// → [ undefined ]


References

Clone this wiki locally