question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The response json returns the empty columns

See original GitHub issue

When there are some columns in a row that are empty / null, then the response json that is returned from the query is having empty indexes.

I think you should create an array with all falsey values removed. So that only the columns that actually exist in a specific row will be returned in the response.

{ resource: 'dynamo',
       name: 'customers",,,,"mpla",,,"table',
       bucket_name: 'fetchCustomer',
       directory_path: 'production' }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:37 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
ghdnacommented, Jan 29, 2019

Just pushed v4.0.0 that parses using csvtojson.

1reaction
wasserholzcommented, Jan 29, 2019

@ghdna so I debugged the code now and like I said the csv parser is not robust enough.

line = line.substring(1, line.length - 1).split('","');

This line messes up. Replace the whole process with csvtojson and it will work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Returning an empty JSON object when a nullable column ...
I have the following query scope that will return keys (JSON) that may be stored inside a container: public function scopeKeys($query, ...
Read more >
Handling JSON null and empty arrays and objects - IBM
Handling null and empty arrays and objects used in JSON data is described. JSON data has the concept of null and empty arrays...
Read more >
How to handle empty JSON response
At the bottom of the screenshot, I have a for each loop (which was automatically created) based on the 'customer' output of a...
Read more >
DataTable and empty JSON response?
Hi,. I have a server-side data source for my DataTable. However, whenever I try to load more than 14 columns from a MySQL...
Read more >
12.18.6 JSON Table Functions
on empty , if specified, determines what JSON_TABLE() does in the event that data is missing (depending on type). This clause is also...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found