I'd like to send list of objects through postman tool and receive it on my server side code, This is the json code i'm sending through postman tool and receiving it throught post method
{
"user1" : {
"name" : "grijan",
"prof" : "student"
},
"user2" : {
"name" : "vijay",
"prof" : "teacher"
}
}
My server side code
var express = require('express');
var app = express();
app.use(express.urlencoded({ extended: false }));
app.use(express.json());
app.post('/saveUser',function(req,res){
var obj= req.body;
console.log(obj);
//code for iteration ????
})
var server = app.listen(8008,function(){});
I need to iterate through the objects and the fields in the objects! FYI i'm new to node this is my 2nd day :)