When you have a multi-value node reference field and output the raw value of that field using the Views JSON module, the field just outputs like this:

"field_nodereference_nid":{"1":"","2":""}

This is because the multi-value raw output is looking for the array key "value" and it doesn't exist. I wrote a patch that fixes this by returning the available data columns imploded (since there isn't really a way to let the user pick a data column). This works great in Node Reference fields because there is only one data column.

CommentFileSizeAuthor
views-json-noderef-raw.patch929 byteschromix

Comments

zeip’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

IMO a better way to handle these is the way already used for some fields, ie. writing specific handlers for special fields. Also, as D6 has been EOL for a number of years, closing this as outdated.