Iam trying to map an array of objects in react js i have to do two things one is i have to display fields according to input type and second is i have to map the data coming