mysql_plugin icon indicating copy to clipboard operation
mysql_plugin copied to clipboard

How to get the real table column as part of the results as well?

Open jensenity opened this issue 6 years ago • 0 comments

   results = [dict([k, str(v)] if v is not None else [k, v]
               for k, v in enumerate(i)) for i in results]

    results = '\n'.join([json.dumps(i) for i in list(results)])

If we just run it by this. For example if the data on the table in mysql is, id: 1 value:100

the results will come out on S3 as {"0":"1", "1":"100"}

But I want to get a result like this = {"id":"1", "value":"100"}

jensenity avatar Jun 19 '18 11:06 jensenity