# extendify/3.0.4/src/Recommendations/utils/object-from-keys.js

Extendify, version 3.0.4. 10 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.0.4/code/src/Recommendations/utils/object-from-keys.js
- Raw: https://pluginprobe.com/plugins/extendify/3.0.4/raw/src/Recommendations/utils/object-from-keys.js
- Modified: 2026-02-18T22:27:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/3.0.4/code/src/Recommendations/utils/object-from-keys.js#L10-L20`.

```javascript
// Accepts an object and a list of selected keys
// and returns a new object with only the selected keys.
export const objectFromKeys = (sourceObject, selectedKeys) =>
	Object.entries(sourceObject)
		.filter(([key]) => selectedKeys.includes(key))
		.reduce((acc, [key, value]) => {
			acc[key] = value;
			return acc;
		}, {});

```
