Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. English
    3. Visualization
    4. Bindung Anzahl Objekte im JSON

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Bindung Anzahl Objekte im JSON

    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      SpacerX last edited by

      Eine Frage zu Binding im Widget.
      Ich möchte die Anzahl der Objekte im JSON ermitteln und darstellen.
      So in der Art:

      {dp:0_userdata.0.datenpunkt;dp.length}
      

      dp ist ein JSON Datenpunkt.

      Jemand sowas schon mal umgesetzt?

      OliverIO 1 Reply Last reply Reply Quote 0
      • OliverIO
        OliverIO @SpacerX last edited by

        @spacerx
        Das müsste gehen. ggfs. musst du aber dp erst in ein Objekt mit JSON.parse umwandeln.
        In manchen fällen hat das Binding mit JSON ein Problem.

        Alternativ kannst du auch das verwenden
        https://forum.iobroker.net/topic/31521/test-widget-json-template?_=1673860471798

        S 1 Reply Last reply Reply Quote 0
        • S
          SpacerX @OliverIO last edited by

          @oliverio folgendes habe ich probiert:

          {dp:0_userdata.0.datenpunkt;dp.length}
          {dp:0_userdata.0.datenpunkt;JSON.parse(dp).length}
          {JSON.parse(0_userdata.0.Datenpunkt).length}
          

          Das scheint genau der Fall zu sein wo das mit dem JSON nicht funktioniert.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          Support us

          ioBroker
          Community Adapters
          Donate

          651
          Online

          31.7k
          Users

          79.6k
          Topics

          1.3m
          Posts

          2
          3
          298
          Loading More Posts
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes
          Reply
          • Reply as topic
          Log in to reply
          Community
          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
          The ioBroker Community 2014-2023
          logo