In HTML I have a div with various data- attribute properties set within a JSON object, e.g.:
<div data-layout='{
"type" : "header",
"minHeight" : "10%"
}'>
Layout
</div>
In code, is it possible to select only elements which have e.g. data-layout.type==="header"
without using .each
or a filter function?
I'm looking for something along the lines of:
$('[data-layout]').find('type="header"')