Reputation: 21
I'm making a Project for Cat lover but When I use a API, I got a Problem. I got below this data but I want a get createdDate data like this 05-04 I Tried like this nowaDays[0].createdDate.substr(5, 5)` but I got only 05-04"
This is what I want
0: {id: 244, createdDate: "05-04", weight: 4}
1: {id: 245, createdDate: "05-04", weight: 5}
2: {id: 246, createdDate: "05-04", weight: 6}
3: {id: 247, createdDate: "05-04", weight: 6}
4: {id: 248, createdDate: "05-04", weight: 7}
5: {id: 249, createdDate: "05-04", weight: 8}
6: {id: 250, createdDate: "05-04", weight: 9}
This picture what i got
Upvotes: 0
Views: 42
Reputation: 354
There's a couple ways you could approach this:
Upvotes: 1