JSON to JSON transformer

后端 未结 7 2059
醉话见心
醉话见心 2020-11-30 03:36

I got a scenario.

Required input and output are JSON.

// Input
{
  \"OldObject\": {
    \"Time\": 1351         


        
相关标签:
7条回答
  • 2020-11-30 03:58

    Another option is use Logz.io Sawmill library. You define a pipeline and execute it. For you example:

    {
      steps: [
        {
          rename {
             config {
                from: "OldObject"
                to: "NewObject"
             }
          }
        }
    
        {
          removeField {
            config {
              path: "NewObject.price"
            }
          }
        }
    
        {
          rename {
            config {
              from: "NewObject.Name"
              to: "NewObject.Title"
            }
          }
        }
      ]
    }
    
    0 讨论(0)
提交回复
热议问题