What is the correct Dataweave code to transform the input into the output?

A. payload.catalog.*book map ((value, index) -> {
index: index,
id: value.@id,
title: value.title
})
B. payload.catalog.*book map (value, index) -> {
index: index,
id: value.@id,
title: value.title
}
C. payload.catalog.book map ((value, index) -> {
index: index,
id: value.@id,
title: value.title
})
D. payload.catalog.*book map ((value, index) -> {
index: index,
id: value.id,
title: value.title
})
Answer: A
0 Comments