Some jSON parsing fun for some other task
by deanpeters
HTML
<script>
var getNando = function() {
var jNando = {"query":{"count":20,"created":"2013-05-23T21:24:23Z","lang":"en-US","results":{"item":[{"title":"Stylin': Raleigh woman makes jewelry with an industrial feel","link":"http://www.newsobserver.com/2013/05/22/2910273/raleigh-woman-makes-jewelry-with.html","pubDate":"Wed, 22 May 2013 20:00 EDT","creator":"Correspondent (Jennifer Bringle)","description":"\n <p>Lauren Markley doesn’t make ordinary jewelry.</p><p>Her pieces aren’t what one might find at Charming Charlie or Claire’s; industrial and geometric, they look more like art than jewelry. </p><p>“Living in economically depressed parts of the country, I saw a lot of abandoned and burnt-out, crumbling buildings,” she says. “My structural pieces and distressed textures – I burn, scratch, gouge and sand a lot of my surfaces – reference these economic and physical changes.” </p><p>A native of Kansas, Markley studied and practiced her craft of metalsmithing in New York City, Iowa and South Carolina before landing in Raleigh. Drawn to jewelry making, she created her Lauren Markley Contemporary Jewelry line using uncommon materials and a sculptural aesthetic. </p><p>“I use sterling silver and brass, and wood that is reclaimed from old piano keys,” she says. “And I use silk thread and spray paint to add color to the work.”</p><p>The result is funky: a brooch resembling a small coral cage adorned with kinked iron wire or silver rings with a rough, industrial look offset by pops of brilliant color. Most of Markley’s pieces are one-of-a-kind, ensuring the wearer isn’t likely to see the same ring or necklace on someone else. </p><p>“I prefer to make one-of-a-kinds because I like to work intuitively and let designs emerge from the raw material and the fabrication process,” she explains. “I’ve been doing a lot of craft shows recently, and I have found that customers...
JavaScript
var pubItem = function(jItem) {
console.log("jNando[" + ix + "] => ", jItem);
if(typeof jItem.content === 'object' && jItem.content.url) {
console.log(" image = ", jItem.content.url);
}
}
var jNando = getNando();
// jNando = jNando['query']['results']['item'];
console.log("jNando", jNando);
for (var ix in jNando) {
if (jNando.hasOwnProperty(ix)) {
// pubItem(jNando[ix]);
jItem = jNando[ix];
if(typeof jItem.content == 'undefined') {
console.log("jItem.???", jItem.description);
} else {
console.log("jItem.description", jItem.content);
}
}
}