Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var request = require('request');
- var myJSONObject = {
- "key": {
- "consultores.username": "2",
- "consultores.password": "2"
- }
- };
- request({
- url: "http://364ee9b9.ngrok.io/imobiliarias/find",
- method: "POST",
- json: true, // <--Very important!!!
- body: myJSONObject
- }, function (err, res, body) {
- if (res.statusCode === 200) {
- for (i = 0; i < body[0].consultores.length; i++) {
- if (body[0].consultores[i].username === "2" &&
- body[0].consultores[i].password === "2") {
- console.log(body[0].consultores[i]);
- }
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement