Problem/Motivation
Multiple value fields are not correctly populated on Drupal by arrays in the source: result is always "Array" (an array of "Array" texts!)
Steps to reproduce
I'm trying to get the "amount"s values imported to a multiple values text field.
The source is like this:
{
"account_responses": [
{
"account": {
"name": "xxx",
"address": "yyy"
},
"balance": {
"denom": "aaa",
"amount": "111"
}
},
{
"account": {
"name": "www",
"address": "zzz"
},
"balance": {
"denom": "bbb",
"amount": "222"
}
}
],
"other_stuff": {}
}
Set up the Feed type like this:
- Fetcher: download from URL
- Parser: JsonPath
- Mapping:
-- Context: *
-- Source: account_responses
-- Target: my_text_field (plain, long, unlimited values)
Import result (my_text_field):
- value1: Array
- value2: Array
I should get instead (trimming whitespace here for readability):
- value1: "account": { "name": "xxx", "address": "yyy" }, "balance": { "denom": "aaa", "amount": "111" }
- value2: "account": { "name": "www", "address": "zzz" }, "balance": { "denom": "bbb", "amount": "222" }
Proposed resolution
(can't code yet and haven't studied Feeds enough yet to help)