index.js
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope) {
$scope.data =[{"Id":1,"Title":"en-US","Description":"UnitedStates","MyValues":[{"demo":"dish","Id":100,"Value":"Save"}]},
{"Id":1,"Title":"en-UK","Description":"UK","MyValues":[{"demo":"Myvalu","Id":102,"Value":"Delete"}]}]
$scope.cols = Object.keys($scope.data[0]);
$scope.notSorted = function(obj){
if (!obj) {
return [];
}
return Object.keys(obj);
}
});
I want to check in
$scope.data
is there any column value as array/collection in above codeMyValues
is aarray/collection
, I tried usingangular.isArray(value)
but it does not work , any help?