Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Freebase result has forward slash in variable name

Status
Not open for further replies.

harmmeijer

Programmer
Mar 1, 2001
869
CN
I get something back like this from freebase:
Code:
var result = {
   "/location/location/containedby" : "the value",
   otherval : 22
}
// result./location/location/containedby gives me syntax error (suggested by
//  jsEclipse auto suggest
// result.location.location.containedby  not working either
// result."location.location.containedby" gives me a syntax error
result.otherval; // no problem

So my question is how do I read a variable that has a forward slash in its name? In other words: how do I read the value of /location/location/containedby?

Kind regards,

Harm Meijer

Greetings, Harm Meijer
 
Lee, thanks for your reply

There is no way I can control what freebase is sending me (maybe changing the query will help but I don't see why).

Firebug can reed the variable so I should be able to do so too.

The example given above is what Freebase.com returnes to me, so there is no way to change variable names.

Kind regards,

Harm Meijer

Greetings, Harm Meijer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top