4

How do i access the JSON object in javascript whena JSON object is something like this.

{'':'my-first-Name'}

The Name of the property is empty and i am not able to access it.

Regards.

0

3 Answers 3

6

You can always access object's property by index of key. For example:

 var object = {'':'my-first-Name'};
 var value = object[''];
Sign up to request clarification or add additional context in comments.

Comments

3

You can access by this

var v={'':'my-first-Name'};

document.write(v['']);

Comments

3

var x = {'':'my-first-Name'}
alert(x['']);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.