I want to return rj: Object below, and I have an index key to match, kid: 1. What’s the best/fastest way of doing considerg the main Object can contain > 10k items?
Object
coord: MM.Coordinate
data: Object
geometry: Object
properties: Object
kid: 1 <== index id
rj: Object <== object i want
__proto__: Object
__proto__: Object
element: HTMLDivElement
location: MM.Location
touch: true
__proto__: Object
If you need to find many objects, you can build a lookup table. Iterate over your collection of main objects, and store them in an key-value-map (simple object) by their identifier:
Now you can simply access your object by