On Fri, Feb 8, 2013 at 9:02 AM, Brendan Taylor <[email protected]> wrote: > I'm using action=parse, format=json, and the result creates a JavaScript > JSON object. The HTML I wish to use is in result.parse.text.*, and the > problem is JavaScript detects a syntax error because of the property named > "*". How can I work around this?
Use the array-like syntax to access the property: result.parse.text['*']. You could even use result['parse']['text']['*'] if you really wanted. http://www.ecma-international.org/ecma-262/5.1/#sec-11.2.1 -- Brad Jorsch Software Engineer Wikimedia Foundation _______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
