I have an object like this:
obj {"name" : "html"
"name2" : "html"
"name3" : "html"}
I want to check every a element on a page, and if the object name matches the text in the a element, insert the html for that name.
How can I do this?
Html:
<div id="paged_view_content">
<div class="vis_item" align="center">
<a href="/game.php? t=487615717&village=22979&mode=combined&group=5043&screen=overview_villages" class="group_tooltip">[00 ATT-BUNK]</a>
<a href="/game.php? t=487615717&village=22979&mode=combined&group=1276&screen=overview_villages" class="group_tooltip">[01 ATT-NOR]</a></div></div>
My "name"s will exactly match names like [01 ATT-NOR] :)
I can check the names with Indexof, but how do I check for each name in the object, and thenn add the html if it matches?