I have the following code to get info from a JSON.
$http.get('http://localhost:3000/folder/'Id)
.success(function (response) {
console.log("response ", response);
console.log("words: ", response.result.all.Word);
})
.error(function (response) {
console.log("error");
});
But I have a problem to get info in the array:
TypeError: Cannot read property 'all' of undefined
In response I have:
response [Object, Object]
0: Object
_id: "543e95d78drjfn38ed53ec"
result: Object
all: ObjectWord: Array[17]
0: "word1"
1: "word2"
2: "word3"
...
Thanks for your help!