node.js - how to create next condition in same value in node js -


i have problems in code

value in json

 [   {     "title": "a",     "detail": {      "descript": "test"     }   },        {     "title": "b",     "detail": {      "descript": "test1"    }  },  {     "title": "c",     "detail": {      "descript": "test2"     }   } ] 

my model api

router.post('/newscreate', function(req, res){ var queryng = req.body || req.body.query; if (queryng){    (i=0; i<queryng.length; i++){        var loop = queryng[i];        if (loop){           if (loop.title != 'a'){                                console.log('true', loop.title);           }else{               console.log('false', loop.title);               //event if value same 'a' post title b , title c           }        }      } } }); 

i have tired 1 day condition, can correct code? thanks


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -