[
{
"docId": "58d8f38cd2f554fdfca4fd18",
"__v": 8,
"clinicDetails": {
"5908e342236dee7e7364698e": {
"appointmentSlots": {
"sat": {
"5908e342236dee7e73646a44": {
"bookFlag": true,
"endTime": "07:00PM",
"startTime": "06:30PM"
},
"5908e342236dee7e73646a43": {
"bookFlag": true,
"endTime": "06:30PM",
"startTime": "06:00PM"
},
.......
完整档案 https://docs.google.com/document/d/1FK1NEY1Vmjzv2gBtleFquA0VMpfYGf9FaMyblPr8vws/edit?usp=sharing
我需要访问5908e342236dee7e73646a44
这些约会广告位ID,以便我可以API request
我正在使用棱角分明。
答案 0 :(得分:1)
尝试使用
var jsonObject = angular.fromJson(yourJsonString)
这会将你的Json变换为一个对象。然后,您可以在对象的任何字段上迭代获取键或值。
angular.forEach(jsonObject.whatever, function(value, key) {
console.log('key : ', key);
console.log('value : ', value);
});