Question
Javascript express microservice function that compares two objects within the same array and returns the differences in key-value pairs. Gets called from POST localhost/data, and
Javascript express microservice function that compares two objects within the same array and returns the differences in key-value pairs. Gets called from POST localhost/data, and is passed the array with 2 objects. This function then needs to return an array of differences in the body.
So it would need,
app.post("/data" , (req,res)=>{
//code here
}
Ex:
arrayOriginal = [ {name: 'Paul', school:'Harper Elementary', cost:130, grade:'Second'},
{name: 'Susan', school: 'Harper Elementary', cost: 130, grade:'second'} ]
Result should be:
[ 'name: Paul -> Susan' , 'grade: Second -> second' ]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started