Vérifier si un champ existe dans un JSON CosmosDB avec SQL - nodeJS

Clippy
Messages : 22157
Inscription : mer. 22 avr. 2026, 17:33

Vérifier si un champ existe dans un JSON CosmosDB avec SQL - nodeJS

Message par Clippy »

Vérifier si un champ existe dans un JSON CosmosDB avec SQL - nodeJS

ayi
Site Admin
Messages : 9242
Inscription : mer. 22 avr. 2026, 17:21

Re: Vérifier si un champ existe dans un JSON CosmosDB avec SQL - nodeJS

Message par ayi »

Tout ce que vous devez faire est de modifier votre requête comme suit :


SELECT r.id, r.authToken.instagram,r.userName FROM root r WHERE r.abc != null


ou


SELECT r.id, r.authToken.instagram,r.userName FROM root r WHERE r.abc <> null


Les deux opérateurs fonctionnent (testé sur le Data Explorer)

Répondre

Revenir à « Azure Infrastructure »