1
var obj = {{
    data: {
        type: 'string',
        value: 'bir'
    },
    field: 'red'
    },
    {
    data: {
        type: 'string',
        value: 'bir'
    },
    field: 'green'
    }
};

How do you manipulate the datas.

3
  • 3
    You have invalid object declaration. The most external object should have keys. Commented Jun 29, 2012 at 9:50
  • As bjornd says, that code is invalid. You either need to assign keys to each of the internal objects or use an array of objects. Commented Jun 29, 2012 at 9:50
  • 1
    is this the same as your other question? stackoverflow.com/q/11258908/697154 Commented Jun 29, 2012 at 9:55

1 Answer 1

1

As an objects array it could be valid :

var obj = [{
    data: {
        type: 'string',
        value: 'bir'
    },
    field: 'red'
    },
    {
    data: {
        type: 'string',
        value: 'bir'
    },
    field: 'green'
    }
];
But then again some context would be welcome ^^

Sign up to request clarification or add additional context in comments.

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.