Imagine a common scenario: an application stores data in an external file on a database. Ideally, the data structure should be easily accessible to any desired value from the program. However, in reality, we often need to convert the raw data into a different structure that is more user-friendly for coding purposes. What is this process called?
A potential incorrect answer might be "mapping." As I understand it, "mapping" typically refers to establishing a relationship between two sets of data, whereas in this case, we are only dealing with one dataset.
For example, let's say we have the following raw data:
const rawData = {
foo: {
a: 'asdf',
b: 'nhyt'
},
bar: {
a: 'gfdsa',
b: 'sdasdf'
}
}
We want to iterate through the data based on the b
value. Therefore, before doing so, we must (find the best synonym for "transform" here) it into:
const preprocessedData = { // optimized? mapped? reduced? reshaped?
[rawData.foo.b]: {
name: 'foo',
a: 'asdf'
},
[rawData.bar.b]: {
name: 'bar',
a: 'gfdsa'
}
}
It's important to note that we are not discussing the specific methods used to reshape the data for accessibility. Instead, I am simply trying to identify the term used for the process of making data more usable. It could be something like "mapping" or "optimization," but neither seems quite right, in my opinion.