[jQuery] jQuery and JSON - newbie!

[jQuery] jQuery and JSON - newbie!


Hi, I'll start off with throwing a warning out there: I'm a newbie :)
Okay, so my problem is this:
I have a div with id=”tooltip”, several divs with unique ids and
lastly a js file with JSON content.
(Part of) my JSON looks like this
({
        "class": "Priest Of Mitra",
        "items": [
        {
            "name": "Lance Of Mitra",
            "tree": "divinity",
            "tier": 0,
            "column": 3,
            "maxRank": 5,
            "description": {
                "base": "New Spell: Sends out a lance that hits all targets in a
column."
            },
            "id": "lanceOfMitraDivinity",
        }
         ]
})
and what I'm trying to achieve is that when you mouseover the div with
id="lanceOfMitraDivinity" the tooltip changes like $
('#tooltip').text(”description” from JSON).
The thing is, first of all I have several spells like the one above in
my JSON, so what I need is for my script to compare the JSON ”id”
field with whatever is moused over, and when they match, change the
content of #tooltip.
The thing I need some help with is the comparison part. As I said I'm
a newbie and still learning to use this JSON thing.
If you need any more information please just tell me.
Thanks
eid