Getting attr value and
<p>Here's what I'm trying to do:</p>

<p>I make a GET request with jquery, and need the response.</p>

<p>In the response there is a dynamic variable that contains an array of values where I need to get a single value </p>

<pre><code>$.ajax({
            type: "GET",
            url: "http://site.com",
            success: function(response) {
                $("#price").html(response);
                var price = ("#price").(".item").attr("item-id");
                console.log(price);

            }
        });
</code></pre>

<p>For example what I am trying to get in the response is</p>

<pre><code>&lt;script&gt;
   Item568 = {
                id: "568",
                name: "Pants",
                cost: "56"
            };

&lt;/script&gt;
</code></pre>

<p>How can I get the cost value "56" from the response of a GET request? Thanks</p>

<p>Here is a example of the response:</p>

<pre><code>&lt;div class="item" item-id="568"&gt;
</code></pre>

<p>I need to take item-id value, then find the dynamic variable name on the page as above. (Item568)</p>
