Vhipper
Vhipper

Reputation: 15

Output of a part of data from a json array

I'm working on a project that uses React redux typescript. The json file has

"data_start": "2022-09-02"

Is it possible to output it in this format ?

(2022, 09, 02)

I'm just learning programming so I don't know how to do it

Upvotes: 1

Views: 19

Answers (1)

Martinez
Martinez

Reputation: 1130

To get the desired output you could do the following:

`(${data_start.replaceAll('-', ', ')})`

Upvotes: 1

Related Questions