Read a JSON file line based on what it starts with using JavaScript
<p>For example, I have a <strong>JSON file called Stores.json</strong> that has lots of numbers like 1142,1234,1890, etc and each one has an address associated with it. It looks something like this but there are <strong>thousands of objects</strong>:</p>

<pre><code>    {
      "1142": {
        "Name": "P. Sherman",
        "Address": "42 Wallaby Way, Sydney",
      }
    }
</code></pre>

<p>I have already looked at this answer: <a href="https://stackoverflow.com/a/24378510">https://stackoverflow.com/a/24378510</a>
But I am still confused about how to read a file based on a string, such as "1142", because I don't know what line the number is on if there are many lines.</p>

<p>I tried:</p>

<pre><code>var mydata = JSON.parse(data**[this is Stores.json]**);
addr = mydata["1142"];
</code></pre>

<p>Maybe I am just confusing JavaScript with PHP?
PHP code would work but I would like the JavaScript version.</p>

<p>EDIT: Assume that there are many objects in the file, I need to be able to select an object using a number. Basically none of the JSON is written in the Javascript Code.</p>