NebulaLogger icon indicating copy to clipboard operation
NebulaLogger copied to clipboard

Is it possible to sort values in Related Record JSON?

Open PawelWozniak opened this issue 2 years ago • 3 comments

New Feature Summary

In error log field "Related Record JSON" I see this: 2023-12-14_14h37_35 I would like to see it sorted from A to Z.

Why? I got null pointer exception and want to check EndDate field value. I am expecting to have it at the top but list is unordered. This is "Nice to have" as I can use search currently but it would be usefull to sort Map keys before it is converted to JSON.

Possible solution: Probably you need to create List out of Map.keyset() then sort it and rebuild MAP again.

PawelWozniak avatar Dec 14 '23 13:12 PawelWozniak

I can try working out on this @jongpie, if you need help on it 😄

JMercie avatar Dec 18 '23 21:12 JMercie

@PawelWozniak thanks for the suggestion! And @JMercie thanks for offering to help! For now, let's hold off on this enhancement - I am exploring the possibility of adding some new LWCs to the LogEntry__c page, and I am thinking of keeping the underlying data as-is, but using an LWC to handle sorting the JSON data. I'm going to explore this approach a bit more before I decide how to best handle this

jongpie avatar Jan 20 '24 15:01 jongpie

@jongpie hey, that's awesome!! Let me know if I can help with it! I would love to do it.

JMercie avatar Jan 21 '24 00:01 JMercie