stateTransformation: invalid path

Hi,

in the json I would like to get the element “detector” to use this with the http binding to switch this to 0 or 1. I thought I could access the property with the following but it results in an invalid path:
stateTransformation=“JSONPATH:$.[0].details.detector”

Where did I dowrong please?

[
   {
      "mid": "HWR",
      "ke": "bXTmWswa0Su",
      "name": "HWR",
      "shto": "[]",
      "shfr": "[]",
      "details": "{\"max_keep_days\":\"\",\"notes\":\"\",\"dir\":\"\",\"rtmp_key\":\"\",\"auto_host_enable\":\"1\",\"auto_host\":\"rtsp://user:password@192.168.11.28:554/stream1\",\"rtsp_transport\":\"tcp\",\"muser\":\"tapouser\",\"mpass\":\"password\",\"port_force\":\"0\",\"fatal_max\":\"0\",\"skip_ping\":null,\"is_onvif\":\"1\",\"onvif_non_standard\":null,\"onvif_port\":\"\",\"onvif_events\":null,\"primary_input\":\"0:0\",\"aduration\":\"1000000\",\"probesize\":\"1000000\",\"stream_loop\":\"0\",\"sfps\":\"\",\"wall_clock_timestamp_ignore\":null,\"accelerator\":\"0\",\"hwaccel\":\"auto\",\"hwaccel_vcodec\":\"\",\"hwaccel_device\":\"\",\"stream_type\":\"mp4\",\"stream_flv_type\":\"ws\",\"stream_flv_maxLatency\":\"\",\"stream_mjpeg_clients\":\"\",\"stream_vcodec\":\"copy\",\"stream_acodec\":\"aac\",\"hls_time\":\"2\",\"hls_list_size\":\"3\",\"preset_stream\":\"ultrafast\",\"stream_quality\":\"15\",\"stream_fps\":\"\",\"stream_scale_x\":\"\",\"stream_scale_y\":\"\",\"stream_rotate\":null,\"signal_check\":\"10\",\"signal_check_log\":\"0\",\"stream_vf\":\"\",\"tv_channel\":\"0\",\"tv_channel_id\":\"\",\"tv_channel_group_title\":\"\",\"stream_timestamp\":\"0\",\"stream_timestamp_font\":\"\",\"stream_timestamp_font_size\":\"\",\"stream_timestamp_color\":\"\",\"stream_timestamp_box_color\":\"\",\"stream_timestamp_x\":\"\",\"stream_timestamp_y\":\"\",\"stream_watermark\":\"0\",\"stream_watermark_location\":\"\",\"stream_watermark_position\":\"tr\",\"snap\":\"0\",\"snap_fps\":\"\",\"snap_scale_x\":\"\",\"snap_scale_y\":\"\",\"snap_vf\":\"\",\"vcodec\":\"copy\",\"crf\":\"1\",\"preset_record\":\"\",\"acodec\":\"aac\",\"record_scale_y\":\"\",\"record_scale_x\":\"\",\"cutoff\":\"15\",\"rotate\":null,\"vf\":\"\",\"timestamp\":\"0\",\"timestamp_font\":\"\",\"timestamp_font_size\":\"10\",\"timestamp_color\":\"white\",\"timestamp_box_color\":\"0x00000000@1\",\"timestamp_x\":\"(w-tw)/2\",\"timestamp_y\":\"0\",\"watermark\":\"0\",\"watermark_location\":\"\",\"watermark_position\":\"tr\",\"record_timelapse\":null,\"record_timelapse_mp4\":null,\"record_timelapse_fps\":null,\"record_timelapse_scale_x\":\"\",\"record_timelapse_scale_y\":\"\",\"record_timelapse_vf\":\"\",\"record_timelapse_watermark\":null,\"record_timelapse_watermark_location\":\"\",\"record_timelapse_watermark_position\":null,\"detector\":\"0\",\"detector_save\":\"0\",\"use_detector_filters\":null,\"use_detector_filters_object\":null,\"detector_record_method\":\"sip\",\"detector_trigger\":\"1\",\"detector_buffer_seconds_before\":\"\",\"detector_timeout\":\"10\",\"watchdog_reset\":\"0\",\"detector_delete_motionless_videos\":\"0\",\"detector_http_api\":null,\"detector_send_frames\":\"1\",\"detector_fps\":\"\",\"detector_scale_x\":\"640\",\"detector_scale_y\":\"480\",\"detector_lock_timeout\":\"\",\"detector_send_video_length\":\"\",\"snap_seconds_inward\":\"\",\"cords\":\"[]\",\"detector_filters\":\"\",\"det_multi_trig\":null,\"group_detector_multi\":\"\",\"detector_pam\":\"1\",\"detector_sensitivity\":\"\",\"detector_max_sensitivity\":\"\",\"detector_threshold\":\"1\",\"detector_color_threshold\":\"\",\"inverse_trigger\":null,\"detector_frame\":\"0\",\"detector_noise_filter\":null,\"detector_noise_filter_range\":\"\",\"detector_use_detect_object\":\"0\",\"detector_send_frames_object\":null,\"detector_obj_count_in_region\":null,\"detector_obj_region\":null,\"detector_use_motion\":\"1\",\"detector_fps_object\":\"\",\"detector_scale_x_object\":\"\",\"detector_scale_y_object\":\"\",\"detector_buffer_vcodec\":\"copy\",\"detector_buffer_acodec\":\"aac\",\"detector_buffer_fps\":\"\",\"event_record_scale_x\":\"\",\"event_record_scale_y\":\"\",\"detector_audio\":null,\"detector_audio_min_db\":\"\",\"detector_audio_max_db\":\"\",\"detector_webhook\":\"0\",\"detector_webhook_timeout\":\"\",\"detector_webhook_url\":\"\",\"detector_webhook_method\":null,\"detector_command_enable\":\"0\",\"detector_command\":\"\",\"detector_command_timeout\":\"\",\"detector_notrigger\":\"0\",\"detector_notrigger_timeout\":\"\",\"detector_notrigger_discord\":null,\"detector_notrigger_webhook\":null,\"detector_notrigger_webhook_url\":\"\",\"detector_notrigger_webhook_method\":null,\"detector_notrigger_command_enable\":null,\"detector_notrigger_command\":\"\",\"detector_notrigger_command_timeout\":\"\",\"control\":\"1\",\"control_base_url\":\"user:passwword@192.168.0.28\",\"control_url_method\":\"ONVIF\",\"control_digest_auth\":null,\"control_stop\":\"0\",\"control_url_stop_timeout\":\"\",\"control_turn_speed\":\"\",\"detector_ptz_follow\":null,\"detector_ptz_follow_target\":\"\",\"control_url_center\":\"\",\"control_url_left\":\"\",\"control_url_left_stop\":\"\",\"control_url_right\":\"\",\"control_url_right_stop\":\"\",\"control_url_up\":\"\",\"control_url_up_stop\":\"\",\"control_url_down\":\"\",\"control_url_down_stop\":\"\",\"control_url_enable_nv\":\"\",\"control_url_disable_nv\":\"\",\"control_url_zoom_out\":\"\",\"control_url_zoom_out_stop\":\"\",\"control_url_zoom_in\":\"\",\"control_url_zoom_in_stop\":\"\",\"control_invert_y\":null,\"groups\":[],\"notify_emailClient\":null,\"notify_global_webhook\":null,\"notify_onUnexpectedExit\":null,\"notify_useRawSnapshot\":null,\"detector_emailClient_timeout\":\"\",\"cust_input\":\"\",\"cust_stream\":\"\",\"cust_snap\":\"\",\"cust_record\":\"\",\"cust_detect\":\"\",\"cust_detect_object\":\"\",\"cust_sip_record\":\"\",\"custom_output\":\"\",\"loglevel\":\"warning\",\"sqllog\":\"0\",\"detector_cascades\":\"\",\"stream_channels\":\"\",\"input_maps\":\"\",\"input_map_choices\":{\"stream\":[],\"snap\":[],\"record\":[],\"record_timelapse\":[],\"detector\":[],\"detector_object\":[],\"detector_sip_buffer\":[]},\"substream\":{\"input\":{\"type\":null,\"stream_flv_type\":null,\"fulladdress\":\"\",\"sfps\":\"\",\"aduration\":\"\",\"probesize\":\"\",\"stream_loop\":null,\"rtsp_transport\":\"\",\"accelerator\":null,\"hwaccel\":null,\"hwaccel_vcodec\":\"\",\"hwaccel_device\":\"\",\"cust_input\":\"\"},\"output\":{\"stream_type\":null,\"stream_mjpeg_clients\":\"\",\"stream_vcodec\":null,\"stream_acodec\":\"\",\"hls_time\":\"\",\"hls_list_size\":\"\",\"preset_stream\":\"\",\"stream_quality\":\"\",\"stream_v_br\":\"\",\"stream_a_br\":\"\",\"stream_fps\":\"\",\"stream_scale_x\":\"\",\"stream_scale_y\":\"\",\"stream_rotate\":null,\"svf\":\"\",\"cust_stream\":\"\"}}}",
      "type": "h264",
      "ext": "mp4",
      "protocol": "rtsp",
      "host": "192.168.10.28",
      "path": "/stream1",
      "port": 554,
      "fps": 1,
      "mode": "start",
      "width": 640,
      "height": 480,
      "currentlyWatching": 0,
      "status": "Watching",
      "code": "2",
      "streams": [
         "/FqCe5MbOtr1P5d5xJI4fBYxVgNZU/mp4/bXAmWJu0Su/HWR/s.mp4"
      ],
      "streamsSortedByType": {
         "mp4": [
            "/FqCe5MbOtr1P5d5xJI4fBYxVgNZU/mp4/bXAmWJu0Su/HWR/s.mp4"
         ]
      }
   }
]

The string within “details” does not look like a valid JSON due to the escaped quotes.

Try if at least stateTransformation=“JSONPATH:$.[0].details will return a valid result and from there you can maybe continue with a JSTransformation

Also please remove username and password if you post your JSON to the public forum