Sven,

I imagine you’re already using the EvaluateJSONPath processor to do this. The 
JSONPath expression you’re looking for is something like the following:

$.package.killmail.attackers[*].xyz

The [*] operator iterates over the collection (sometimes referred to as a 
“spread operator” in other languages). You should re-examine the JSON structure 
though, as I don’t see character.name or corporation.name in the attacker 
element.

I find http://jsonpath.com <http://jsonpath.com/> to be a helpful tool when 
crafting JSONPath expressions as it provides live feedback against your 
provided input as you enter the expression.

Andy LoPresto
[email protected] <mailto:[email protected]>
[email protected] <mailto:[email protected]>
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On Jan 16, 2017, at 4:38 PM, Sven Davison <[email protected] 
> <mailto:[email protected]>> wrote:
> 
> I have a JSON object that i'm pulling back from ( 
> http://redisq.zkillboard.com/listen.php 
> <http://redisq.zkillboard.com/listen.php> )
> i can get the victim.. by $.package.killmail.victim.character.name 
> <http://package.killmail.victim.character.name/>
> 
> i want to pull something specific out of the attackers array. like all of 
> attacker names.. or attacker corporation names...
> 
> .package.killmail.attackers{}.character.name <http://character.name/>
> .package.killmail.attackers{}.corporation.name <http://corporation.name/>
> 
> 
> 

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to