so I'm inserting the date of birth to an API, and the API returns the updated information, which i'm supposed to present on another page after handling the data in java backend.
Here is what gets returned in JSON:
"firstname": "John",
"middlename": "The",
"lastname": "Doe",
"displayName": "John The Doe",
"dateOfBirth": [
1994,
3,
26
]
so what I'm having trouble with, is picking out the 3 (year/month/day) in separate variables, because if theres no 0 in 03 ( mars for example ) i want to add the 0, same goes with day.
Here i'm getting the object:
@Override
public Object getDateOfBirth() {
return get("dateOfBirth");
}
But i'm getting [1994,3,26]
which obviously looks very bad displayed on a website.
How would you get the 3 "1994,3,26" in different variables?
Any help is greatly appreciated.