Skip to content

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

Description

@jensenity
   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"}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions