Skip to content

Commit

Permalink
Fixed: (Cardigann) Handle json field selector that returns arrays
Browse files Browse the repository at this point in the history
Closes #950
  • Loading branch information
Qstick committed Apr 16, 2022
1 parent 828aea1 commit 7e3dcb3
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,16 @@ protected string HandleJsonSelector(SelectorBlock selector, JToken parentObj, Di
return null;
}

value = selection.Value<string>();
if (selection.Type is JTokenType.Array)
{
// turn this json array into a comma delimited string
var valueArray = selection.Value<JArray>();
value = string.Join(",", valueArray);
}
else
{
value = selection.Value<string>();
}
}

if (selector.Case != null)
Expand Down

0 comments on commit 7e3dcb3

Please sign in to comment.