Greetings All,
how do i create an API end Point which will return the following output. I have the database already storing the below data.
{
"membershipNumber" : "1234567",
"phoneNumber" : "265997655406",
"emailAddress" : "henry.sauzande@angledimension.com",
"firstName" : "Henry",
"otherNames" : "Alfred",
"lastName" : "Sauzande",
"gender" : "MALE",
"hasDependents" : true,
"dateOfBirth" : "1990-01-01T00:00:00.000z",
"schemeType" : "EXE",
"membershipStatus" : "ACTIVE",
"lastRenewalDate" : "2023-12-01T00:00:00.000z",
"dependents" : [
{
"fistName" : "Gillian",
"lastName" : "Sauzande",
"dateOfBirth" : "1990-01-01T00:00:00.000z",
"gender" : "FEMALE",
"suffixNumber" : "02"
},
{
"fistName" : "Aira",
"lastName" : "Sauzande",
"dateOfBirth" : "2020-04-27T00:00:00.000z",
"gender" : "FEMALE",
"suffixNumber" : "03"
},
{
"fistName" : "Aiden",
"lastName" : "Sauzande",
"dateOfBirth" : "2023-08-23T00:00:00.000z",
"gender" : "MALE",
"suffixNumber" : "04"
}
]
}
Must i appreciated. I have followed the guide it has been helpful.
Now do create and return an array within and array?