ConvertFrom-Json and arrays

Hello,

I’m currently stuck on importing a Json file. I could boil it down to this example:

'{"FiltList":{"1":"a","2":["b","c"]}}' | ConvertFrom-Json

FiltList                 
--------                 
@{1=a; 2=System.Object[]}

How can I convert the array [“b”,“c”] to an usefull object instead of “System.Object

Cheers
Quirks

$a = '{"FiltList":{"1":"a","2":["b","c"]}}' | ConvertFrom-Json
$a.FiltList
$a.FiltList.1
$a.FiltList.2

1 2     
- -     
a {b, c}
a
b
c

Some times I’m slow on the uptake. Thanks for the clarification.

PS /Users/me> ($a.filtlist.2)[0]                                            
b
PS /Users/me> ($a.filtlist.2)[1]                                            
c

Just to conclude this topic.
I was struggling because in my code I’ve set up an hash table with a hash table inside with an array inside. I’ve used this structure to do some work.

After several iterations I’ve saved this structure to a json file. When importing this json file to continue the work I was running in quite some trouble accessing the values, because what I’m getting back was not my initial structure but a psobject.

I’ve solved this problem by initializing the whole structure with psobjects. So my code can access the structure in the first and each following run.