Import mapping creates two records

0
Hello, I am invoking a restful web service which returns me a JSON structure.  I am trying to insert that to a table (Entity). The JSON structure that is being returned has Address structure as shown below: [    {       "pharmacyName":"HealthCare Medi Pvt Ltd.",       "registrationNumber":"7071334556",       "firstName":"Joseph",       "middleName":"",       "lastName":"D",       "pharmacyContact":"8985808789",       "emailId":"joseph.d@gmail.com",       "address":{          "address1":"1st Floor, Samuel Heights",          "address2":"Park Avenue Street",          "city":"Belmont",          "state":"CA",          "zipcode":"77001"       }    } ] Using the above json structure I have created a mapping as but that mapping inserts two physical records to this Entity.  Actually it should be one only.   Please advise what has to be modified to ensure that I get only one record instead of two.   
asked
2 answers
1

An easier approach than my first suggestion, would be to just go into the import mapping, click “Select elements...”, and untick “address”. That will put all the attributes into a single entity. Screenshot attached!

answered
0

You are getting two objects because you have both set to create a new object in your import mapping. 

One way to fix this is to change the second entity so instead of “Create an object” where it says to “Obtain Mendix Object”, select “Call a microflow”.

When you create this microflow, select the Mapping Parent as a parameter. This will return the first object when it’s run, so your address details will populate into the same object as the other data.

Hope this helps!

UPDATE: Use my other answer, this is overcomplicated.

answered