'Design pattern to format data from multiple api sources
I have multiple data sources with different formats and structures:
[{
name: 'test',
power: 10
}]
[{
title: 'my title',
impact: 10
}]
<?xml version="1.0" encoding="UTF-8" ?>
<root>
<row>
<name>my name</name>
<power>12</power>
</row>
</root>
I would like to adapt them regroup them in a single format structure. I use typescript but i guess this is really language agnostic. Is there a design pattern for this case ? Maybe Mapper, adapter, strategy ?
Thank you for your answers !
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
