【问题标题】:Output of a part of data from a json array从一个json数组中输出一部分数据
【发布时间】:2022-11-29 05:02:19
【问题描述】:

我正在开发一个使用 React redux typescript 的项目。 json文件有

“data_start”:“2022-09-02”

是否可以以这种格式输出?

(2022, 09, 02)

我刚学编程,不知道怎么做

【问题讨论】:

    标签: reactjs json typescript redux


    【解决方案1】:

    要获得所需的输出,您可以执行以下操作:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-02-12
      • 1970-01-01
      • 2021-06-27
      • 1970-01-01
      • 1970-01-01
      • 2020-02-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多