ahmed elbarbary

ahmed elbarbary

  • NA
  • 1.6k
  • 254.8k

How to return value of Loc value from url angular 7 ?

Dec 28 2019 4:07 AM
How to return Loc value from link URL angular 7 ?
i need actually to return value of loc related to location
meaning i only need to return value 27737
i need to only value of Loc from json object from URL
so my question How to write service and calling
this service on component ngoninit event
I actually need to return only one value from this url
so that
How to write service and calling on component ngoninit event
apiservice.ts
How to create service return only one value from url object ?
http://192.168.4.233:9200/pcn/_search
  1. and on component.ts  
  2. ngoninit
  3. {  
  4. //How to call service and return data on variable  
  5. }  
  1. {  
  2. "_index""partsdb",  
  3. "_type""_doc",  
  4. "_id""10",  
  5. "_version": 32,  
  6. "_seq_no": 115683922,  
  7. "_primary_term": 2,  
  8. "found"true,  
  9. "_source": {  
  10. "PID": 10,  
  11. "CID": 1005070,  
  12. "CN""Texas Instruments Incorporated",  
  13. "PN""THS6002CDWP",  
  14. "Eq""Driver, Receiver and Transceiver Interface Transceiver 2 2 20HSOIC Tube",  
  15. "FID": 4,  
  16. "FN""THS6002",  
  17. "PaID": 5260,  
  18. "PaN""20-HSOIC",  
  19. "PLID": 523842,  
  20. "PLN""Driver, Receiver and Transceiver Interfaces",  
  21. "PLC""Active",  
  22. "PIDT": 2007,  
  23. "ObY": 2024,  
  24. "NPI"false,  
  25. "FT""THS6002 Dual Differential Line Driver/Receiver",  
  26. "DS""277399925",  
  27. "FIDT": 1998,  
  28. "LCRev": 20777025,  
  29. "Masked_ID": 6012356,  
  30. "Compliance": [  
  31. {  
  32. "RS""Compliant",  
  33. "RET""None",  
  34. "RV""2015/863",  
  35. "RST""Datasheet",  
  36. "CRS""Compliant",  
  37. "HTS""Compliant",  
  38. "RES""Compliant",  
  39. "RESV""JUL 2019 (201)",  
  40. "PNDR": 49416942,  
  41. "RHV": 963041,  
  42. "RECV": 273158534,  
  43. "HFR": 49416942  
  44. }  
  45. ],  
  46. "  
  47. "OtherQualification": [  
  48. {  
  49. "FN""Reliability",  
  50. "FV""Yes",  
  51. "R": 283151994  
  52. },  
  53. {  
  54. "FN""Confidence Level",  
  55. "FV""60",  
  56. "R": 283151994  
  57. },  
  58. {  
  59. "FN""Fails Quantity",  
  60. "FV""0",  
  61. "R": 283151994  
  62. },  
  63. {  
  64. "FN""Test Duration",  
  65. "FV""1000",  
  66. "R": 283151994  
  67. },  
  68. {  
  69. "FN""Test Temperature",  
  70. "FV""125°C",  
  71. "R": 283151994  
  72. },  
  73. {  
  74. "FN""MTBF/MTTF(Hrs)",  
  75. "FV""5.58E8",  
  76. "R": 283151994  
  77. },  
  78. {  
  79. "FN""Activation Energy/Test Voltage",  
  80. "FV""0.7",  
  81. "R": 283151994  
  82. },  
  83. {  
  84. "FN""Calculated Failure Rate(FIT)",  
  85. "FV""1.8",  
  86. "R": 283151994  
  87. },  
  88. {  
  89. "FN""Usage Temperature",  
  90. "FV""55°C",  
  91. "R": 283151994  
  92. },  
  93. {  
  94. "FN""Sample Size",  
  95. "FV""6515",  
  96. "R": 283151994  
  97. },  
  98. {  
  99. "FN""Application",  
  100. "FV""Commercial",  
  101. "R": 10792132  
  102. }  
  103. ],  
  104. "Parametric": [  
  105. {  
  106. "FN""Receiver Hysteresis",  
  107. "N""N/A",  
  108. "V": -9.999999990000000e+008,  
  109. "T": 1,  
  110. "O": 10  
  111. },  
  112. {  
  113. "FN""Data Rate",  
  114. "N""N/A",  
  115. "V": -9.999999990000000e+008,  
  116. "T": 1,  
  117. "O": 4  
  118. },  
  119. {  
  120. "FN""Minimum Operating Temperature",  
  121. "N""0°C",  
  122. "V": 0.000000000000000e+000,  
  123. "U""°C",  
  124. "T": 1,  
  125. "O": 11  
  126. },  
  127. {  
  128. "FN""Maximum Operating Temperature",  
  129. "N""70°C",  
  130. "V": 7.000000000000000e+001,  
  131. "U""°C",  
  132. "T": 1,  
  133. "O": 12  
  134. },  
  135. {  
  136. "FN""Maximum Supply Current",  
  137. "N""40mA",  
  138. "V": 4.000000000000000e-002,  
  139. "U""A",  
  140. "T": 1,  
  141. "O": 7  
  142. },  
  143. {  
  144. "FN""Minimum Supply Voltage",  
  145. "N""9V, ±4.5V",  
  146. "T": 1,  
  147. "O": 5  
  148. },  
  149. {  
  150. "FN""Maximum Supply Voltage",  
  151. "N""32V, ±16V",  
  152. "T": 1,  
  153. "O": 6  
  154. },  
  155. {  
  156. "FN""ESD Protection Voltage",  
  157. "N""N/A",  
  158. "V": -9.999999990000000e+008,  
  159. "T": 1,  
  160. "O": 13  
  161. },  
  162. {  
  163. "FN""ESD Protection",  
  164. "N""No",  
  165. "T": 1,  
  166. "O": 0  
  167. },  
  168. {  
  169. "FN""Type",  
  170. "N""Transceiver",  
  171. "T": 2,  
  172. "O": 1  
  173. },  
  174. {  
  175. "FN""Protocol",  
  176. "N""DSL",  
  177. "T": 2,  
  178. "O": 8  
  179. },  
  180. {  
  181. "FN""Number of Drivers",  
  182. "N""2",  
  183. "V": 2.000000000000000e+000,  
  184. "U""",  
  185. "T": 2,  
  186. "O": 2  
  187. },  
  188. {  
  189. "FN""Number of Receivers",  
  190. "N""2",  
  191. "V": 2.000000000000000e+000,  
  192. "U""",  
  193. "T": 2,  
  194. "O": 3  
  195. },  
  196. {  
  197. "FN""Duplex",  
  198. "N""Full",  
  199. "T": 2,  
  200. "O": 9  
  201. },  
  202. {  
  203. "FN""Interface Type",  
  204. "N""Others",  
  205. "T": 2,  
  206. "O": 0  
  207. }  
  208. ],  
  209. "TradeCodes": [  
  210. {  
  211. "C""8542390001",  
  212. "CT""HTS-US",  
  213. "R": 266969774  
  214. }  
  215. ],  
  216. "Tags": [  
  217. {  
  218. "T""Green"  
  219. },  
  220. {  
  221. "T""Supply Chain 3"  
  222. }  
  223. ],  
  224. "Crs": [  
  225. {  
  226. "CrID": 5014000201,  
  227. "PckdD": 276,  
  228. "PinID": 0,  
  229. "UpgrID": 5014000069,  
  230. "CrsCnt": 0  
  231. }  
  232. ],  
  233. "Locations": [  
  234. {  
  235. "Loc": 27737,  
  236. "Fab""Assembly"  
  237. }  
  238. ],  
  239. "FMDs": [  
  240. {  
  241. "CMD": 624216,  
 so can you help me to return value of loc from location object
meaning i need to write service 
then call it to return value of loc 27737 

Answers (3)