theJava
theJava

Reputation: 15034

Populating value using Array

var AppArray = [{
        Col1: 'asas', Col2:'12'
      },
      {
        Col1: 'asas2', Col2:'12'
      }];

Upvotes: 1

Views: 84

Answers (1)

Sachin Shanbhag
Sachin Shanbhag

Reputation: 55489

Why do you need this as an array if you have only one object in it.

you can just create an object itself instead of array and use it directly as PrimeObj.col1 and PrimeObj.col2.

var PrimeObj = {col1: 'bsbbsb', col2:'30042'};

Upvotes: 2

Related Questions