JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://defiantjs.com/defiant.js/dist/defiant-latest.min.js"></script>
<div id="output"></div>
JavaScript
var data = {
"store": {
"book": [
{
"@price": 12.99,
"title": "Sword of Honour",
"category": "fiction",
"author": "Evelyn Waugh"
},
{
"@price": 22.99,
"title": "The Lord of the Rings",
"category": "fiction",
"author": "J. R. R. Tolkien",
"isbn": "0-395-19395-8"
}
],
"bicycle": {
"@price": 19.95,
"brand": "Cannondale",
"color": "red"
}
}
},
found = JSON.search(data, '//*[contains(title, "Lord")]');
document.getElementById('output').innerHTML = found[0].title;