Laravel 6 – Inbound JSON API Data Mapping Simplified

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?


"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": "[email protected]",
"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

from Newest questions tagged laravel-5 – Stack Overflow

Related Posts

Codeigniter : Parse error: syntax error, unexpected ‘const’ (T_CONST), expecting variable (T_VARIABLE) in Laravel project

I’m getting following error: **Parse error: syntax error, unexpected ‘const’ (T_CONST), expecting variable (T_VARIABLE)** Note : It’s working in local but facing issue in production server. private…

Firebase receive notification while tab is active or on focus

What i want is to be able to perform an action when a user receives a notification while the browser is open and tab is active or…

Laravel’s alias loader does not find class

We have a legacy project that we cannot update and we need to make some changes in symfony’s Response.php in vendor. We have solved this by copying…

Laravel 5 – generic document management

I have a system where you can create different types of unique documents. For instance, one document is called Project Identified and this expects certain inputs. Originally,…

Laravel Nova limit the results in indexQuery

I ran intro a situation where I need to limit the results of a resource to only 3 results. To be more specific, based on the logged…

Auditoria en laravel 5.8 [closed]

Cómo puedo automatizar el registro de actividades de un usuario en laravel? Si un usuario ingresa a un app de laravel, debo guardar toda su actividas, a…

Leave a Reply

Your email address will not be published.