Platform
Resources
Pricing
Sign in
Get started
Jonathan Terrell
Workspace
Fork
Published
By
Jonathan Terrell
Edited
Oct 25, 2021
Insert cell
Insert cell
Insert cell
Insert cell
{
const
transformedArray
=
[
]
;
for
(
const
row
of
array
)
{
const
transformedRow
=
{
}
;
for
(
const
column
of
columnsToKeep
)
{
transformedRow
[
column
]
=
row
[
column
]
;
}
transformedArray
.
push
(
transformedRow
)
;
}
return
transformedArray
;
}
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
array
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
columnsToKeep
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML