Created
January 10, 2018 06:11
-
-
Save EldonMcGuinness/2c45ba1e8a177dd4371402924c09d3c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
function strip(str) { | |
return str.replace(/^\s+|\s+$/g, ''); | |
} | |
var json = {}; | |
var productArray = Array(); | |
$.each($('.plist'), function(k,v){ | |
var a = $(v).find('.plistname').text().trim(); | |
var b = $(v).find('.plistbtm h4').text().replace('Price: ','').trim(); | |
productArray.push(Array(a,b)); | |
}); | |
JSON.stringify(productArray); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment