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

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


UvxnI8U.png (1880×644)

 

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

Post a Comment

0 Comments