Created
January 15, 2019 13:10
-
-
Save yanmendes/1d7437122b4421bdd08db89a1263c3c3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Refactor: do this in a smarter way | |
let columns = [] | |
_.each(res.results, res => { | |
_.each(Object.keys(res), key => { | |
if (!_.find(columns, o => o.key === key)) | |
columns.push({ key: key, title: key, dataIndex: key }) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment