I have the following array of collections:
[
{
file: "https://link-to-file.com",
name: "My file.png"
},
{
file: "https://another file.com",
name: "Another file.png"
}
]
How can I transform it to:
[
{
url: "https://link-to-file.com",
name: "My file.png"
},
{
url: "https://another file.com",
name: "Another file.png"
}
]
As you can I just want to rename one of the keys. In JS I can achieve it very easily by using .map()
function. How can I do the same using Make built-in functions?