armd / mapping
map json or xml file or API with yaml config file
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/armd/mapping
Requires
- ext-simplexml: *
- symfony/yaml: ^6.1
This package is auto-updated.
Last update: 2025-10-11 22:24:59 UTC
README
map JSON or XML file or API with YAML config file
how to install
composer require armd/mapping
how to use
if you have a JSON like below, and you want to change your "products" key to "merchandise" and also you want to change the first product's "description" key to "details":
{
"products": [
{
"id": 1,
"title": "iPhone 9",
"description": "An apple mobile which is nothing like apple",
"price": 549,
"discountPercentage": 12.96,
"rating": 4.69,
"stock": 94,
"brand": "Apple",
"category": "smartphones",
"thumbnail": "https://dummyjson.com/image/i/products/1/thumbnail.jpg",
"images": [
"https://dummyjson.com/image/i/products/1/1.jpg",
"https://dummyjson.com/image/i/products/1/2.jpg",
"https://dummyjson.com/image/i/products/1/3.jpg",
"https://dummyjson.com/image/i/products/1/4.jpg",
"https://dummyjson.com/image/i/products/1/thumbnail.jpg"
]
}
],
"total": 100,
"skip": 0,
"limit": 30
}
You should write your YAML file like this:
products:
value: "merchendise"
child:
0:
child:
description:
value: "details"