Loop a json model to find the characters in it using indexOf?

[{
"url": "http://img06.tooopen.com/images/20160921/tooopen_sy_179583447187.jpg",
"media": [5, 3, 4, 0, 1],
"notesCount": 100,
"unProcessedCount": 100,
"area": {
  "customerName": "",
  "appellation": "",
  "tel": 15833150000
},
"modifytime": "12:12 2018-3-28"
  }, {
"url": "https://img.codeshelper.com/upload/img/2021/03/06/ard4xrwuhiz4797.jpg",
"notesCount": 100,
"unProcessedCount": 100,
"area": {
  "estate": "",
  "tel": 15833150000
},
"modifytime": "12:12 2018-3-28"
  }]
  
      model
       for (var i = 0; i < arr.length; iPP) {
       if (arr[i].indexOf("") !== -1) {
               
            }
        }    
Mar.06,2021

arr [I] .indexOf means arr [I] .toString (). IndexOf that is, "[object Object]" .indexOf , so of course not, if you have to use indexOf you need to do JSON.stringify (arr [I]) processing.

Menu