Results for “Where-Object”
Small, practical examples. Search by task or narrow things down below.
Iterate over object entries
Read JavaScript property names and values using Object.entries.
JavaScript✓ Tested
List an object’s own enumerable keys
JavaScript: Object.keys omits inherited and non-enumerable properties.
JavaScript✓ Tested
List an object’s own enumerable keys
TypeScript: Object.keys omits inherited and non-enumerable properties.
TypeScript✓ Tested
Memoize an object passed to a provider
Memoize an object passed to a provider with a small React component and explicit browser behavior.
React✓ Tested
Merge object settings
Use object spread to apply JavaScript overrides to defaults.
JavaScript✓ Tested
Narrow an object using a type pattern
C#: A successful is pattern introduces a strongly typed local variable.
C#✓ Tested
Narrow an object with a pattern variable
Java: Pattern matching avoids a separate cast after a successful instanceof check.
Java✓ Tested
Parse JSON into an object
Access a named field in a JSON document.
JSON✓ Tested
Pass an object to the style prop
Pass an object to the style prop with a small React component and explicit browser behavior.
React✓ Tested
Read an object’s own enumerable values
JavaScript: Object.values provides values without their corresponding keys.
JavaScript✓ Tested
Read an object’s own enumerable values
TypeScript: Object.values provides values without their corresponding keys.
TypeScript✓ Tested
Reject unknown JSON object fields
Reject unknown JSON object fields using a complete Go program with explicit sample inputs.
Go✓ Tested