go-patch icon indicating copy to clipboard operation
go-patch copied to clipboard

Expected to find an array at path ... but found 'map[interface {}]interface {}'

Open FulcrumTeam opened this issue 5 years ago • 0 comments

Hello, getting an error (the title) when trying to replace (add) what I think is an array element.

Here is the manifest block I'm trying to match on:

       - job_name: bosh
          scrape_interval: 2m
          scrape_timeout: 1m
          static_configs:
          **- targets:
            - localhost:9190**

my replace statement:

- type: replace
path: /.../job_name=bosh/static_configs/targets/-
value: "192.168.164.26:9190"

How can I add another value to targets?

FulcrumTeam avatar May 22 '20 16:05 FulcrumTeam