How to make many conditions for one field?

Hi, i want to make many conditions associate to one field, itry this code
if [Duration] >= 336 {
mutate {
add_field => { "price" => "50$" }
}
}
else if [Duration] == 15{
mutate {
add_field => { "price" => "10$" }
}
}
the output in elasticsearch
field price show only 50$ , so how can i make many condition in the same field price??

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