Skip to content
Advertisement

How do i search by ID in json file? [closed]

so let’s say i have this JSON file:

JavaScript

And i need function that searches by ID,("1": / "2": is ID basically) and saves it in variable. (Using Javascript). I just don’t know how to do it.

Advertisement

Answer

Why not just standard bracket notation for this…?

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement