From 8dc9a140ee95c204209474c3c4682d2f4504cc0d Mon Sep 17 00:00:00 2001 From: Jay Patel Date: Thu, 18 Aug 2016 21:47:17 -0400 Subject: [PATCH] added check for object to save the url checks the values to see if it is an image object, and if it is, it will display the url for the image file. --- papaparse.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/papaparse.js b/papaparse.js index 4dd12bb..f9097f7 100644 --- a/papaparse.js +++ b/papaparse.js @@ -361,6 +361,14 @@ { if (typeof str === 'undefined' || str === null) return ''; + + + // if the String passed in that we are checking in the unparse + // is a object (which means it is a img file from the json) + // so get the url from it, so users can access the file. + if(typeof str ==="object") { + return str.url; + } str = str.toString().replace(/"/g, '""');