Question: I have an array like this:

```
[
{"price": 10},
{"price": 20},
{"price": 30}
]

```

I want to go over each price item and set it to be negative.

If i do something like this:

```
.[].price = .[].price * -1

```

I'll get:

```
[
  {
    "price": -10
  },
  {
    "price": -10
  },
  {
    "price": -10
  }
]
[
  {
    "price": -20
  },
  {
    "price": -20
  },
  {
    "price": -20
  }
]
[
  {
    "price": -30
  },
  {
    "price": -30
  },
  {
    "price": -30
  }
]

```

How do i do it properly so at the end it will look like this?

```
[
{"price": -10},
{"price": -20},
{"price": -30}
]

```

Answer: 
If the output is to be an array, then consider:

```
map( .price |= -1 * . )

```

If the price on output must be negative even if the input price is already negative, then you could replace the expression in parens by:

```
  if .price > 0 then .price |= -1 * . else . end

```
How about

```
.[] as $x | { price: ($x.price * -1) } 

```

Here is a working example:  

<https://jqplay.org/s/VeGHuouLRY>