Calculate nested objects

(Thomas Kiechle) #1

I like to multiply the amount and price of products of an order an sum those. Is the VisualBuilder able to calculate such nested Objects?


amount: 1 * price: 15.00 = 15.00
amount: 2 * price: 20.00 = 40.00

= 55.00


{ orderId: 123, products:[ { id:23, amount: 1, price: 1500}, { id: 45, amount: 2, price: 2000, }]}

(Tyler Smalley) #2

Kibana doesn't have much support for nested objects. If the data is not actually a nested type, then you could create a scripted field to calculate the order total. Alternatively, it would be best to index the document with the order total.

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.