Hey there! I'm currently attempting to combine an array, a variable, and a "." in between them. The object I receive from json is stored in data
, while valuePickup
represents a variable.
My current approach:
self.GetIndex = function (valuePickup) {
$http.get("someURL").success(function (data, status, headers, config) {
console.log(data + "." + valuePickup); // This does not display the desired object
console.log(data.categories); // This is the result I'm aiming for
});
}
The output resembles [object Object].categories
Any suggestions on how to concatenate an array object and a variable together?