P
P
Pavel Chuev2018-02-21 22:26:55
JavaScript
Pavel Chuev, 2018-02-21 22:26:55

How to implement the display of elements from JSON on checkboxes in JS?

GET request I get a response in JSON format like the following (only one piece, the whole code is quite large)

4442 => 
    array (
      'tourid' => '4442',
      'shipid' => '206',
      'shipname' => 'Княжна ВИКТОРИЯ',
      'shipown' => 1,
      'tourstart' => '2018-05-03T12:30:00',
      'tourfinish' => '2018-05-09T18:00:00',
      'tourroute' => 'Москва (СРВ) - Мышкин - Ярославль - Городец (Н.Новгород) - Плёс - Кострома - Углич - Москва (СРВ)',
      'tourdays' => '7',
      'tourholiday' => '1',
      'touronline' => '1',
      'tourminprice' => '37800',
      'tourisspecialoffer' => true,
      'tourdiscount' => '5',
      'tourdiscountexp' => '2018-02-28T23:59:59',
    )

The HTML page has a small checkbox search form. Ie, for example, I check the box "cruise days 5-7"
And in JSON, respectively, there are a bunch of such cruises with a period of 5-7 days
'tourdays' => '7',
. How can I display a list of these cruises, at least some of their data?
'tourroute' => 'Москва (СРВ) - Мышкин - Ярославль - Городец (Н.Новгород) - Плёс - Кострома - Углич - Москва

Only HTML and JS. Any options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sergey, 2018-02-22
@hahenty

Option - grid control. This is a "type" of libraries for working with tabular data, there is filtering for such a case.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question