var a={LogGroupName:'/sam/xxx/ab/xxx/ayb/lob-star',LogStreamName:'tsy98',S3_Bucket:'abc'};
var array=[a];
console.log(array);
[ { LogGroupName: '/sam/xxx/ab/xxx/ayb/lob-star',LogStreamName: 'tsy98',S3_Bucket: 'abc' } ]
将需要动态地找到数组的长度,并从json对象中可变化键值。
所需的输出:
LogGroupName=/sam/xxx/ab/xxx/ayb/lob-star
console.log(LogGroupName);
需要帮助。