How to detect an object is empty

Very small tips, As a memorandum.

To detect an object is empty or not

WeWeb Formula:
keys( some_object ).length = 0

JavaSctipt code:
return Object.keys( some_object ).length === 0

(These tips aren’t described in the Document. I want more example.)

I guess that in order of importance, this is not one of their priorities because this is simple JavaScript that can be learned on the web after 1-2 lessons. I am sure that eventually the team will have some sort of intro to how they are transcribing JavaScript to their wwLib.

1 Like