First, you are missing ".0" in the path, the correct path is "scene.0.dialogue.2.id"
Check out this demo project, it shows paths to all keys in JSON:
dropbox.com/s/srgf9lme08by9wa/JSON-RecursiveRead.c3p
But without seeing the code of that dialogue system it's impossible to tell how it works and when the line is actually "executed". There's probably some event that extracts the ".line" value from JSON and displays it on the screen. So you can try adding a sub-event there that will check if the current JSON path is "scene.0.dialogue.2" and if ".id" key equals 2.
.
I have a similar dialogue system, where I added a "function" key in JSON. So when a dialogue line is shown, if "function" key exists for it, the function with that name is automatically called.