 <p>You don't need to split anything, simply loop:</p> <pre><code>$.getJSON('data/data.json', function (ids) { for (var i = 0; i &lt; ids.length; i++) { var id = ids[i]; console.log(id); } }); </code></pre> <p>jQuery will automatically parse the string returned from the server as a javascript array so that you could directly access its elements.</p> <p>You could split each element by the space if you want to retrieve the 2 tokens.</p>