This file contains 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
let columns = temp1.table.columns, | |
identifiers = { | |
'Company name': 'name', | |
'City': 'city', | |
'Where to apply': 'url', | |
'Status': 'status' | |
}; | |
function getData (row) { | |
return _.reduce(columns, (acc, column) => { |
This file contains 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
/** | |
1. Observed the Network tab in chrome devtools | |
2. Found out the request that has all the data | |
3. Right click the data (response of the network request) -> Store as global variable (this basically makes the entire data | |
available in the Console of DevTools) - it’s stored under a variable called as temp1 | |
3. Figured out by writing _.VERSION in the console that Lodash library was available, so I can use that to convert my data. | |
4. Observed the payload, figured out how columnIds are mapped to the data that is present in the entire response JSON. | |
5. Wrote the following scripts to access the data: | |
**/ |
This file contains 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
// Use it with the componentWillReceiveProps lifecycle method | |
// | |
// componentWillReceiveProps(nextProps) { | |
// shallowEqual(this.props, nextProps); | |
// } | |
// | |
function shallowEqual(objA, objB) { | |
if (is(objA, objB)) return true |