Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #37826

Parse out after newline and paragraph?

Newsgroups comp.lang.javascript
Date 2019-11-22 02:10 -0800
Message-ID <d088ea44-e208-40fd-9a85-f2178820eb01@googlegroups.com> (permalink)
Subject Parse out after newline and paragraph?
From Jonas Thörnvall <jonas.thornvall@gmail.com>

Show all headers | View raw


": [
        {
          "duration": 0.0881409374999933,
          "durationTicks": 22,
          "midi": 72,
          "name": "C5",
          "ticks": 13056,
          "time": 52.30764,
          "velocity": 0.952755905511811

I try to parseout the time from string above, but i do not manage get rid of the comma after time event.

It is probably because i do not know how to adjust relative the paragraph?

impTimeStart=impNote[IN].indexOf('"time": ');
impTimeEnd=impNote[IN].indexOf(',\n"velocity":');
impTime=impNote[IN].substring(impTimeStart+8,impTimeEnd);

I do not do much parsing so a full example, would be nice. Maybe i just do it a silly way to start with.

Jonas T

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Parse out after newline and paragraph? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-11-22 02:10 -0800
  Re: Parse out after newline and paragraph? JJ <jj4public@vfemail.net> - 2019-11-22 18:36 +0700
    Re: Parse out after newline and paragraph? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-11-22 03:58 -0800
      Re: Parse out after newline and paragraph? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-11-22 04:09 -0800
        Re: Parse out after newline and paragraph? JJ <jj4public@vfemail.net> - 2019-11-23 08:38 +0700
          Re: Parse out after newline and paragraph? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-11-22 23:31 -0800
  Re: Parse out after newline and paragraph? John G Harris <niam@jghnorth.org.uk.invalid> - 2019-11-22 18:25 +0000
    Re: Parse out after newline and paragraph? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-11-22 11:09 -0800
      Re: Parse out after newline and paragraph? John G Harris <niam@jghnorth.org.uk.invalid> - 2019-11-23 10:51 +0000
        Re: Parse out after newline and paragraph? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-11-23 05:04 -0800
          Re: Parse out after newline and paragraph? John G Harris <niam@jghnorth.org.uk.invalid> - 2019-11-23 18:37 +0000
            Re: Parse out after newline and paragraph? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-11-24 09:58 -0800
              Re: Parse out after newline and paragraph? John G Harris <niam@jghnorth.org.uk.invalid> - 2019-11-24 18:51 +0000
            Re: Parse out after newline and paragraph? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-11-24 10:01 -0800
              Re: Parse out after newline and paragraph? John G Harris <niam@jghnorth.org.uk.invalid> - 2019-11-24 19:28 +0000
                Re: Parse out after newline and paragraph? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-11-25 01:19 -0800
                Re: Parse out after newline and paragraph? John G Harris <niam@jghnorth.org.uk.invalid> - 2019-11-25 18:28 +0000
                Re: Parse out after newline and paragraph? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-11-26 04:24 -0800
                Re: Parse out after newline and paragraph? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-11-27 05:41 -0800
                Re: Parse out after newline and paragraph? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-11-30 08:47 -0800
                Re: Parse out after newline and paragraph? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-11-30 10:38 -0800
                Re: Parse out after newline and paragraph? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-11-30 11:21 -0800
  Re: Parse out after newline and paragraph? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-11-22 10:43 -0800
    Re: Parse out after newline and paragraph? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-11-22 11:11 -0800
      Re: Parse out after newline and paragraph? luserdroog <luser.droog@gmail.com> - 2019-11-23 12:09 -0800
        Re: Parse out after newline and paragraph? Julio Di Egidio <julio@diegidio.name> - 2019-11-23 18:21 -0800
          Re: Parse out after newline and paragraph? Julio Di Egidio <julio@diegidio.name> - 2019-11-23 19:08 -0800
            Re: Parse out after newline and paragraph? luserdroog <luser.droog@gmail.com> - 2019-11-23 19:52 -0800
              Re: Parse out after newline and paragraph? Julio Di Egidio <julio@diegidio.name> - 2019-11-23 21:54 -0800
          Re: Parse out after newline and paragraph? luserdroog <luser.droog@gmail.com> - 2019-11-23 18:56 -0800

csiph-web