N1QL - How do you compare 2 document in N1QL and show only difference on all the attributes including array with simple N1QL statement

How do you compare 2 document in N1QL and show only difference on all the attributes including array(max of 2 levels) with simple N1QL statement ?

Really appreciate it if there is a simple solution .

I don’t it is possible. It is hard to represent out put as JSON.

If both documents has identical fields and one level

SELECT  OBJECT v:doc1[v] == doc2[v]
                    FOR v IN OBJECT_NAMES(doc1) END
LET doc1 = (SELECT RAW d FROM default USE KEYS "k01")[0],
         doc2 =  (SELECT RAW d FROM default USE KEYS "k02")[0];

@vsr1. Thank you so much .