Disclaimer: I don't know the language.
It's not compact vs verbose to me. They're very different from the understanding point. First is bad: can you tell the precedence of && over || from the top of your head? I mean, is A && B || C == (A && B) || C or A && (B || C)? Maybe you can, I can't.
Second's logic is clear at least, though I wouldn't extract jsonStr or dataObj in their own lines, there's no added value in it. But it's very minor compared to above.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Disclaimer: I don't know the language.
It's not compact vs verbose to me. They're very different from the understanding point. First is bad: can you tell the precedence of && over || from the top of your head? I mean, is A && B || C == (A && B) || C or A && (B || C)? Maybe you can, I can't.
Second's logic is clear at least, though I wouldn't extract jsonStr or dataObj in their own lines, there's no added value in it. But it's very minor compared to above.