you can slice an object using the slice() method. The slice() method creates a shallow copy of a portion of an array or object. Here's an example: const originalObject = {a: 1, b: 2, c: 3, d: 4}; const slicedObject = Object.slice(originalObject, 1, 3); Resulting slicedObject will be: {b: 2, c: 3}. Note that Object.slice() only creates a shallow copy, meaning that any changes made to the sliced object will also affect the original object. If you want a deep copy, you can use a library like lodash or a custom implementation. Object.entries(obj).slice(0,2).map(entry => entry[1]); //["foo", "bar"]Object.entries(obj).slice(-1) //[ ['prop4', {'prop': 'buzz'}] ]Object.entries(obj).slice(0).map(entry => entry[0]); //["prop1", "prop2", "prop3", "prop4"]const obj = {'prop1': 'foo', 'prop2': 'bar', 'prop3': 'baz', 'prop4': {'prop': 'buzz'}};