JavaScript Create rowspans with jquery

I append the data from a json-object to a table:

var array1 = $.map(data, function (field, i) 
{
    return '<tr><td>' + field.date + '</td><td>' + field.art + '</td><td class="san' + field.art +'">' + field.text + '</td></tr>';
});

$('#TableBody').append(array1.join(''));

enter image description here

Actually this works pretty good and i get a output like this:

<tbody id="TableBody">
<tr><td>18.02.2014</td><td>D</td><td class="sanD">Was soll ich sagen</td></tr>
<tr><td>18.02.2014</td><td>DD</td><td class="sanDD">hallo</td></tr>
<tr><td>17.02.2014</td><td>R</td><td class="sanR">Erster Versuch</td></tr>
</tbody>

But i would like to have such an output: Means that same field.date have only one row:

<tbody id="TableBody">
<tr><td rowspan="2">18.02.2014</td><td>D</td><td class="sanD">Was soll ich sagen</td></tr>
<tr><td>DD</td><td class="sanDD">hallo</td></tr>
<tr><td>17.02.2014</td><td>R</td><td class="sanR">Erster Versuch</td></tr>
</tbody>

How can i achieve this? Thanks

Fiddle: http://jsfiddle.net/V2mmw/2/

Answer:1

For Google Apps Script for Google Docs, in the Sidebar.html file I use this code(simplified to remove irrelevant parts): <div class="sidebar branding-below"> <form> <div class="...

For Google Apps Script for Google Docs, in the Sidebar.html file I use this code(simplified to remove irrelevant parts): <div class="sidebar branding-below"> <form> <div class="...

  1. google apps script tutorial
  2. google apps script getrange
  3. google apps script documentation
  4. google apps script sheets
  5. google apps script logger
  6. google apps script api
  7. google apps script get sheet by name
  8. google apps script for loop
  9. google apps script reference
  10. google apps script dashboard
  11. google apps script triggers
  12. google apps script web app
  13. google apps script date
  14. google apps script editor
  15. google apps script array
  16. google apps script alert
  17. google apps script send email
  18. google apps script spreadsheet
  19. google apps script global variable
  20. google apps script libraries

jsFiddle: http://jsfiddle.net/az6Ug/ Using Snap.svg library, I want drag on the SVG and get the mouse position. I need the mouse position on the internal matrix, not the browser mouse position. I ...

jsFiddle: http://jsfiddle.net/az6Ug/ Using Snap.svg library, I want drag on the SVG and get the mouse position. I need the mouse position on the internal matrix, not the browser mouse position. I ...

I am still newbie to integrate elfinder and tinymce, i already follow tutorial in elfinder wiki in form.php in tinymce init already added file_browser_callback:elFinderBrowser: tinyMCE.init({ ...

I am still newbie to integrate elfinder and tinymce, i already follow tutorial in elfinder wiki in form.php in tinymce init already added file_browser_callback:elFinderBrowser: tinyMCE.init({ ...

  1. integrate elfinder with codeigniter

For example, i have an array like this: var arr = [ {"keyword": "Sample 1", "item": {"title":"Sample Title", "url": "/sample"}}, {"keyword": "Foo 1", "item": {"title":"Foo Title", "url": "/...

For example, i have an array like this: var arr = [ {"keyword": "Sample 1", "item": {"title":"Sample Title", "url": "/sample"}}, {"keyword": "Foo 1", "item": {"title":"Foo Title", "url": "/...

  1. javascript search object for value
  2. javascript search object for key
  3. javascript search object array
  4. javascript search object for property
  5. javascript search object for string
  6. javascript search object array by property
  7. javascript search object for key value
  8. javascript search object array for value
  9. javascript search object recursively
  10. javascript search object property value