I have an inbound API to develop on our app and we want to simplify our code regarding data transformation. The JSON message will contain many elements and nested arrays. So as we don't want to deploy new code when a value changes, we want to solve data transformation in some file or table that we can quicky edit/add value.
For example, in tags
element, we will have multiple values that we need to transform and we want to do it outside code so it's easy for us to mantain the API data mapping without releasing new code.
We are also considering to use JSONata for data transformation but we are not sure if can have this kind of template file for data transformation. This nodeJS code will be in a Google Cloud Function if it's possible, if not we will have to go with first approach to solve all data transformation with Laravel.
Does anyone has made a similar development for this requirement?
Regards
"objects":
{
"address": "Address",
"age": 0,
"bathroom_amount": 0,
"branch": {
"address": "Juramento 1111",
"alternative_phone": "1111111",
"alternative_phone_area": "11",
"alternative_phone_country_code": "+549",
"alternative_phone_extension": "",
"branch_type": "Internal",
"contact_time": "9 a 19 hs",
"created_date": "2020-02-27T19:52:39",
"display_name": "Juan Pablo",
"email": "juan@x.org",
"geo_lat": "-34.556",
"geo_long": "-58.447",
"gm_location_type": "ROOFTOP",
"id": 17661,
"is_default": false,
"logo": "https://domain/logograndesuma.jpg",
"name": "Example",
"pdf_footer_text": "Footer",
"phone": "11111",
"phone_area": "11",
"phone_extension": "",
"use_pdf_footer": true
},
"company": {
"contact_info": "",
"key": "11111111",
"logo": "https://domain/image.jpg",
"name": "Keller Williams BA"
},
"created_at": "2020-02-27T19:52:37",
"custom1": "0.00",
"custom_tags": [],
"deleted_at": "2020-03-10T21:02:45",
"description": "Description",
"development": null
"tags": [
{
"id": 5,
"name": "Electricidad",
"type": 1
},
{
"id": 6,
"name": "Pavimento",
"type": 1
}
]
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire